package com.demo;

import com.demo.controller.ControllerDemo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author YuanYuan
 * @Date 2023/2/7
 * @Time 16:33
 */
public class Demo1 {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-config.xml");
        ControllerDemo controllerDemo = applicationContext.getBean("controllerDemo",ControllerDemo.class);
        System.out.println(controllerDemo.getServiceDemo().sayHi());

    }
}
